import { Dispatch } from 'redux';
import { LoadDesignsParams } from 'src/modules';
import { Actions } from './actions';

export interface CanvasDispatcher {
  loadDesigns(params: LoadDesignsParams): void;
}

export const getCanvasDispatcher = (dispatch: Dispatch): CanvasDispatcher => {
  return {
    loadDesigns(params: LoadDesignsParams) {
      dispatch(Actions.loadDesigns(params));
    },
  };
};
